<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="李愧愧">
    <title></title>
    <style>

    </style>
</head>

<body>

    <script>
        function zhiShu(num) {
            if (num <= 1) {
                return false;
            }
            for (var i = 2; i < num; i++) {
                if (num % i == 0) {
                    return false;
                    break;
                }
            }
            return true;
        }
        for (var i = 0; i <= 1000; i++) {
            if (zhiShu(i)) {
                document.write(i + '<br>');
            }
        }
    </script>
</body>
<ml>